<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>校园宿舍管理系统</title>
<link href="${path }/css/style.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="${path }/js/checkForm.js" 
	charset="gb2312"></script>
<meta http-equiv="Content-Type" 
	content="text/html;charset=gb2312"/>
</head>

<body>
<center>
<table class="out">
<tr>
    <td class="title">校园宿舍管理系统</td>
</tr>
<tr>
    <td class="subtitle">&nbsp;</td>
</tr>
<tr>
    <td class="content">
    <table class="out">
    <tr>
        <td class="left" >
        	<%@ include file="left.jsp"%>
     	</td>
        <td class="right">
        <table class="rightTable"> 
        <tr>
            <td class="rightout">
            <form name="form1" action="saveStudent.do" 
            	 method="post" onsubmit="return checkAddStudent()">
            <input name="id" value="${student.id }" type="hidden">
            <c:if test="${student!=null }">
            <input name="dId" value="${student.domitory.id }">
            </c:if>
            <table class="fullTable" >
            <tr>
                <td class="inputLeft">&nbsp;</td>
                <td class="inputRight">&nbsp;</td>
             </tr>
             <tr>
                <td class="inputLeft">
                <span class="leftSpan">*</span>用户名：</td>
                <td><input name="username" class="input" value="${student.username }"></td>
            </tr>
            <tr>
                <td class="inputLeft">
                <span class="leftSpan">*</span>密码：</td>
                <td><input name="password" type="password" class="input"  value="${student.password }"></td>
            </tr>
            <tr>
                <td class="inputLeft">
                <span class="leftSpan">*</span>重复密码：</td>
                <td><input name="rePassword" type="password" class="input" value="${student.password }"></td>
            </tr>
            <tr>
                <td class="inputLeft">
                <span class="leftSpan">*</span>姓名：</td>
                <td><input name="name" class="input" value="${student.name }"></td>
            </tr>
            <tr>
                <td class="inputLeft">
                <span class="leftSpan">*</span>性别：</td>
                <td><select name="sex">
                  	<option value="">请选择</option>
                  	<option value="男" selected="${student.sex=='男' }">男</option>
                  	<option value="女">女</option>
                	</select>
                </td>
            </tr>
            <tr>
                <td class="inputLeft">
                <span class="leftSpan">*</span>专业：</td>
                <td><input name="major" class="input" value="${student.major }"></td>
            </tr>
            <tr>
                <td class="inputLeft">
                <span class="leftSpan">*</span>状态：</td>
                <td>
                	<c:if test="${student==null }">
                	<input name="state" value="未入住" type="hidden">
                	<input value="未入住" class="input" disabled="disabled">
                	</c:if>
                	<c:if test="${student!=null }">
                	<input name="state" value="${student.state }" type="hidden">
                	<input value="${student.state }" class="input"  disabled="disabled">
                	</c:if>
                	
                </td>
            </tr>
            <tr>
                <td class="inputLeft">&nbsp;</td>
                <td><input type="submit" value="保存">
                    &nbsp;&nbsp;
                   <input type="button" value="返回上页" onClick="javascript:history.back(-1);"></td>
            </tr>
            </table>
            </form>
            </td>
        </tr>
        </table>

    </table>
    </td>
</tr>
<tr>
    <td class="bottom">&nbsp;</td>
</tr>
</table>
</center>
</body>
</html>